package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.Domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_order")
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "Order对象", description = "商品")
public class Order extends Domain {
    @TableId(value = "id", type = IdType.AUTO)//如果没有这句 id会以很大的id
    @ApiModelProperty(name = "id", value = "主键-ID")
    private Long id;

    @Excel(name = "平台订单号", width = 30)
    @ApiModelProperty(value = "订单号")
    private String orderNo;
    @Excel(name = "订单金额")
    @ApiModelProperty(value = "订单金额")
    private BigDecimal amount;
    @Excel(name = "实际金额")
    @ApiModelProperty(value = "实际金额")
    private BigDecimal actualAmount;
    @ApiModelProperty(value = "支付金额")
    private BigDecimal payAmount;
    @ApiModelProperty(value = "服务费")
    private BigDecimal serviceFee;
    @ApiModelProperty(value = "抢单费")
    private BigDecimal createFee;
    @ApiModelProperty(value = "用户订单状态 待支付 paid  已超时 timeout  已完成:finish ")
    private String status;
    @ApiModelProperty(value = "用户id")
    private Long userId;
    @ApiModelProperty(value = "username")
    private String username;

    @ApiModelProperty(value = "收款人姓名")
    private String name;
    @ApiModelProperty(value = "收款人账号")
    private String account;
    @ApiModelProperty(value = "收款人支付宝图片")
    private String pic;
    @ApiModelProperty(value = "付款人转账码")
    private String payerPic;
    @ApiModelProperty(value = "支付宝用户Url")
    private String zfbUrl;

    @ApiModelProperty(value = "支付宝用户Id")
    private String zfbUserId;
    @ApiModelProperty(value = "收款人银行")
    private String bankName;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "放款时间")
    private Date sendTime;

    @ApiModelProperty(value = "商户id")
    private Long merchantId;
    @Excel(name = "商户订单号", width = 30)
    private String merchantOrderNo;

    private String notifyUrl;
    @Excel(name = "订单状态", readConverterExp = "handling=处理中,success=成功,reject=驳回")
    @ApiModelProperty(value = "订单状态 待支付 handling  已收款 success")
    private String orderStatus;

    private Integer returnStatus;

    @ApiModelProperty(value = "备注")
    private String apiRemark;

    @ApiModelProperty(value = "付款人")
    private String payer;
    @ApiModelProperty(value = "0  不显示  1 显示")
    private Integer showStatus;
    @ApiModelProperty(value = "通道编码")
    private String channelCode;
    @ApiModelProperty(value = "通道名称")
    @Excel(name = "通道名称")
    private String channelName;
    @ApiModelProperty(value = "订单收益")
    private BigDecimal earning;

    @ApiModelProperty(value = "0  不显示  1 显示")
    private Integer remindStatus;

    @ApiModelProperty(value = "auto 自动回调  handle 会员确认回调")
    private String type;
    @ApiModelProperty(value = "h5支付html")
    private String html;

    @ApiModelProperty(value = "h5支付html")
    private String tradePic;


    @ApiModelProperty(value = "h5支付html")
    private Date tradeTime;

    @ApiModelProperty(value = "1 冻结  0 未冻结")
    private Integer freezeStatus;

    //    private Integer agentStatus;
    @ApiModelProperty(value = "区服")
    private String serviceNo;
    @ApiModelProperty(value = "游戏玩家")
    private String gamer;
    //是否有商品信息  默认 0
    private Integer goodsStatus;
    private String goodsName;
    private String goodsPic;

}